#include<stdio.h>
const int n=5; // Global Scope and constant throughout this file
void populateData(int* dataarray,int sz);
int main (int argc, char** argv)
{
int intarray[n];
int swap;
printf ("This is program to calculate the Mean and Variance of given any five integers\n");
for(int i=1;i,i<=5;i++)
{
printf ("Please give %d integer and press enter for the second\n:",i);
scanf("%d",&swap);
intarray[i]=swap;
}
populateData(intarray, n);
return 0;
}
void populateData(int* dataarray,int sz){
printf("This Fucntion for mean is now called to perform Action");
int sum=0, mean=0;
for(int i=0;i<sz;i++)
{
sum = sum + dataarray[i];
//dataarray[i]=i; it will assign all the data present i values to the location number of i in the array.
}
mean = sum/5;
printf("The Mean for the given intgers is %d",mean);
}
